#pragma once
#include "afxwin.h"


// CSettingWindow dialog

class CSettingWindow : public CDialog
{
    DECLARE_DYNAMIC(CSettingWindow)

public:
    CSettingWindow(CWnd* pParent = NULL);   // standard constructor
    virtual ~CSettingWindow();

// Dialog Data
    enum { IDD = IDD_SETTINGS };

protected:
    CButton m_btnExpand;
    bool m_flagExpanded;
    int m_originWidth;
    int m_midWidth;

protected:
    void SetDatabasePaths(void);
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

    DECLARE_MESSAGE_MAP()
public:
    CString m_rootServerAddress;
    unsigned int m_rootServerPort;
    unsigned int m_localServerPort;
    int m_nMaxConnection;
    CString m_questionLibrary;
    CString m_answerDatabase;
    BOOL m_flagRootServer;

    CString m_databaseHost;
    unsigned int m_databasePort;
    CString m_databaseUserName;
    CString m_databasePassword;
    CString m_databaseName;

    CString m_studentsTable;
    CString m_studentNameCol;
    CString m_studentNumberCol;

    CString m_invigilatorsTable;
    CString m_invUserNameCol;
    CString m_invPasswordCol;

    afx_msg void OnBnClickedOk();
    virtual BOOL OnInitDialog();
    afx_msg void OnBnClickedCheckRootserver();
    afx_msg void OnBnClickedButtonOpenquestionlibrary();
    afx_msg void OnBnClickedButtonOpenanswerdatabase();
    afx_msg void OnBnClickedButtonExpand();
};